import request from '@/utils/request'

export function fetchSpecialistList() {
  return request({
    url: '/specialists',
    method: 'get'
  })
}

export function fetchSpecialistById(id) {
  return request({
    url: `/specialists/${id}`,
    method: 'get'
  })
}

export function createSpecialist(data) {
  return request({
    url: '/specialists',
    method: 'post',
    data
  })
}

export function saveSpecialists(data) {
  return request({
    url: '/specialists/save',
    method: 'post',
    data
  })
}

export function updateSpecialist(id, data) {
  return request({
    url: `/specialists/${id}`,
    method: 'put',
    data
  })
}

export function deleteSpecialist(id) {
    return request({
      url: `/specialists/${id}`,
      method: 'delete'
    })
}
  
